//
//  NewTableViewCell.m
//  Mtime
//
//  Created by Mac on 15/8/4.
//  Copyright (c) 2015年 wxk. All rights reserved.
//

#import "NewTableViewCell.h"

@implementation NewTableViewCell

- (void)awakeFromNib {
 
    // Initialization code
}

- (void)setModel:(NewMovieModel *)model {

    _model = model;
    
    _day.text = [NSString stringWithFormat:@"%@日",model.rDay];

    [_imageV setImageWithURL:[NSURL URLWithString:model.image]];
    
    _title.text = model.title;
    
    _type.text = model.type;
    
    _average.text = model.director;
    
    //创建一个富文本
    NSMutableAttributedString *mstr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@人在期待上映",model.wantedCount]];
    
    //给富文本添加设置
    [mstr addAttribute:NSForegroundColorAttributeName
                 value:[UIColor orangeColor]
                 range:NSMakeRange(0, [model.wantedCount stringValue].length)];
    
    _count.attributedText = mstr;
    
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)buyButton:(UIButton *)sender {
}

- (IBAction)newButton:(UIButton *)sender {
}
@end
